from core.basehandler import BaseHandler
from core.room import Room
from items.studentid import StudentID
from items.grapplinggun import GrapplingGun
from items.crumplednote import CrumpledNote
from core.action import Action

# do basic initialization for every room
class Locker(Room):
    def __init__(self, room_id):
        Room.__init__(self, room_id)    
        
        # add inventory items - NONE ARE NEEDED FOR THE HALLWAY
        self.add_item(StudentID())
        self.add_item(GrapplingGun())
                      
        # build list of actions
        self.add_action(GoToThirdFloorHallway)
        
    # return description of room.
    def get_description(self):
        return "You are at a locker. Grab whatever is inside."
    
    # return image of room
    def get_image(self):
        return 'Locker.jpg'
    
class LockerHandler(BaseHandler):
    # return class to use to create a new instance of this room
    def get_room_class(self):
        return Locker

# define actions for this room        
class GoToThirdFloorHallway(Action):
    def __init__(self):
        Action.__init__(self, "GoToThirdFloorHallway")
    
    def get_description(self):
        return "Head back to Hallway"
    
    def get_destination(self):
        return 'thirdfloorhallway'
    
    def get_method(self):
        return "get"